home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / asm / sincos.zip / SINCOSDW.BAS < prev    next >
BASIC Source File  |  1993-05-09  |  728b  |  30 lines

  1. '
  2. ' Written by Draeden /VLA
  3. '    
  4. ' Feel free to use in any manner that pleases you.
  5. ' Creates a neat little chart of sin/cosine value.
  6. '
  7. ' WARNING: Not to be taken internally
  8. '
  9.     PI=3.1415926
  10.     NumAng = 256      'number of angle divisions per 2*pi
  11.     open "sincos.dw" for output as 1
  12.     print #1, "Sine   dw ";
  13.     count = 0:MaxCount = 8
  14.     for Y=0 to NumAng * 1.25 -1
  15.         SI=INT(SIN(Y*2*PI/NumAng)*256 + .5)
  16.         if count > 0 then print #1, ",";
  17.         print #1, using "######"; si;
  18.         count = count +1
  19.         if y=NumAng/4-1 then
  20.             print #1, " ":Print #1,"Cosine dw ";
  21.             count = 0
  22.         Else
  23.             if count >= MaxCount and y < NumAng*1.25-1 Then
  24.                 print #1, " ":print #1, "       dw ";
  25.                 count = 0
  26.             END if
  27.         End If
  28.     next
  29.  
  30.